package com.inboyu.operation.domain;

import java.util.List;

public class CustomerDomainService {

    private final CustomerRepository customerRepository;

    public CustomerDomainService(final CustomerRepository customerRepository) {
        this.customerRepository = customerRepository;
    }

    public void saveCustomer(Customer customer) {
        customerRepository.save(customer);
    }

    public void isExistOperationCompany(String operationCompanyId) {
    	// todo 校验运营商是否存在
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Customer findCustomerById(String customerId) {
    	// todo 查询Customer
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List<Customer> findCustomerByCondition(String operationCompanyId, String name, String mobile) {
        // 校验运营商是否存在
        isExistOperationCompany(operationCompanyId);
        // 查询
        return customerRepository.findByCondition(operationCompanyId, name, mobile);
    }
}
